package com.yanmaohu.nikita.data.function.statement;

import com.yanmaohu.nikita.data.expression.AssignmentExpression;
import com.yanmaohu.nikita.data.expression.Expression;
import com.yanmaohu.nikita.data.operator.AssignmentOperator;

/**
 * @author Bright Lee
 */
public final class AssignmentStatement extends Statement {

    private AssignmentExpression assignmentExpression;

    public AssignmentStatement(int beginIndex,
                               int endIndex,
                               AssignmentExpression assignmentExpression) {
        super(beginIndex, endIndex);
        this.assignmentExpression = assignmentExpression;
    }

    public AssignmentOperator getAssignmentOperator() {
        return assignmentExpression.getAssignmentOperator();
    }

    public Expression getVariable() {
        return assignmentExpression.getVariable();
    }

    public Expression getVariableValue() {
        return assignmentExpression.getVariableValue();
    }
    
}
